package com.endurance.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: sunlin
 * @Date: 2024-04-21 4:26
 * @Version: 1.0
 * @Description: 测试Controller
 */
@RestController
@RequestMapping
@RefreshScope
public class HelloController {

    @Value("${server.port}")
    private String port;

    @Value("${env}")
    private String env;

    @RequestMapping("/hello")
    public String hello() {
        return env + "===" + port;
    }

}
